
#ifndef __LOG_UTILES___
#define __LOG_UTILES___

#include <string>


namespace woe
{
#ifdef UNICODE

#define TS(str) L##str
#else

#define TS(str)	str
#endif

	enum
	{
		LGT_Simple,
		LGT_ThreadSafe,
		LGT_Async,
	};


	class TimeStamp 
	{
	public:
        TimeStamp();
        TimeStamp(unsigned int seconds, unsigned int microSeconds = 0);

        inline int getSeconds() const {          return _seconds;        };

        inline int getMilliSeconds() const {         return _microSeconds / 1000;        };

        inline int getMicroSeconds() const {         return _microSeconds;        };

		void format(std::string& fmt)const;

        static inline const TimeStamp& getStartTime() {         return _startStamp;        };
	protected:
        static TimeStamp _startStamp;

        int _seconds;
        int _microSeconds;
    };

	class LogLevelUtil
	{
	public:
		//
		//	get log level name
		//
		static const std::string&		getLogLevelName(short lvl);
		static short					getLogLevel(const std::string& lvlName);
	protected:
		static std::vector<std::string> __log_level_names;
	};
}

#endif
